package com.mohe.shanpao.domain.user;

import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

@Table(name = "sys_users")
public class SysUser 
{
	@Id
	@Column(name = "id")
	private Long id;
	
	@Column(name = "nick_name")
    private String nickName;//昵称
	
	@Column(name = "name")
	private String name;//名称账号
	
	@Column(name = "password")
	private String password;//密码
	
	@Column(name = "salt")
	private String salt;//随机串

	@Column(name = "status")
	private Long status;//用户状态 0:启用;1:禁用
	
	@Column(name = "locked")
	private boolean locked;//锁定状态 0:启用;1:锁定
	
	@Column(name = "create_time")
	private Date createTime;//创建时间
	
	@Transient
	private List<SysRole> sysRoles;//角色
	
	public List<SysRole> getSysRoles() {
		return sysRoles;
	}

	public void setSysRoles(List<SysRole> sysRoles) {
		this.sysRoles = sysRoles;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getSalt() {
		return salt;
	}

	public void setSalt(String salt) {
		this.salt = salt;
	}

	public Long getStatus() {
		return status;
	}

	public void setStatus(Long status) {
		this.status = status;
	}

	public boolean isLocked() {
		return locked;
	}

	public void setLocked(boolean locked) {
		this.locked = locked;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
}
